<template>
  <div class="card">
    <div class="card_header">
      <span>{{ title }}</span>
      <i class="el-icon-info" />
    </div>
    <div class="card_body">
      <div class="card_body_value">{{ value }}</div>
      <div class="card_body_item">
        <slot />
      </div>
    </div>
    <div class="card_footer">
      <slot name="footer" />
    </div>
  </div>
</template>

<script>
export default {
  name: 'Card',
  props: {
    title: {
      type: String,
      default: ''
    },
    value: {
      type: String,
      default: ''
    }
  }
}
</script>

<style lang="scss" scpoed>
  .card {
    padding: 20px;
    box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
    .card_header {
      display: flex;
      justify-content: space-between;
      color: #ccc;
      font-size: 14px;
    }
    .card_body {
      padding: 10px 0 5px 0;
      margin-bottom: 5px;
      border-bottom: 1px solid #f0f0f0;
      .card_body_value{
        font-size: 26px;
      }
      .card_body_item {
        height: 50px;
        display: flex;
        align-items: flex-end;
      }
    }

  }
</style>
